﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataAccess.ObjectTwo
{
  public class D_Cal
    {
      ConnectionToDataBase ex = new ConnectionToDataBase();
      DataTable tb = new DataTable();
      public DataTable Distance(int a, int b)
      {
          SqlParameter[] sqlParameters = new SqlParameter[2];
          sqlParameters[0] = new SqlParameter("@ValA", SqlDbType.Int);
          sqlParameters[0].Value = a;
          sqlParameters[1] = new SqlParameter("@ValB", SqlDbType.Int);
          sqlParameters[1].Value = b;
          return ex.executeSelectQuery("CalculatorA", sqlParameters);
      }
      public DataTable FEE(int a, int b)
      {
          SqlParameter[] sqlParameters = new SqlParameter[2];
          sqlParameters[0] = new SqlParameter("@ValA", SqlDbType.Int);
          sqlParameters[0].Value = a;
          sqlParameters[1] = new SqlParameter("@ValB", SqlDbType.Int);
          sqlParameters[1].Value = b;
          return ex.executeSelectQuery("CalculatorB", sqlParameters);
      }
    }
}
